home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / libraries / locale.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  10KB  |  280 lines

  1. #ifndef LIBRARIES_LOCALE_H
  2. #define LIBRARIES_LOCALE_H
  3. /*
  4. ** locale.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/01/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for locale.h
  17. */
  18. #ifndef CatalogPtr
  19. #define CatalogPtr ADDRESS
  20. #endif
  21. #ifndef LocalePtr
  22. #define LocalePtr ADDRESS
  23. #endif
  24. #ifndef LocaleBasePtr
  25. #define LocaleBasePtr ADDRESS
  26. #endif
  27. /*
  28. ** End of StructPointer defines for locale.h
  29. */
  30.  
  31.  
  32. /*****************************************************************************/
  33.  
  34.  
  35. #ifndef EXEC_TYPES_H
  36. #include <exec/types.h>
  37. #endif
  38.  
  39. #ifndef EXEC_NODES_H
  40. #include <exec/nodes.h>
  41. #endif
  42.  
  43. #ifndef EXEC_LISTS_H
  44. #include <exec/lists.h>
  45. #endif
  46.  
  47. #ifndef EXEC_LIBRARIES_H
  48. #include <exec/libraries.h>
  49. #endif
  50.  
  51. #ifndef UTILITY_TAGITEM_H
  52. #include <utility/tagitem.h>
  53. #endif
  54.  
  55.  
  56. /*****************************************************************************/
  57.  
  58.  
  59. /* constants for GetLocaleStr() */
  60. #define DAY_1       1   /* Sunday    */
  61. #define DAY_2       2   /* Monday    */
  62. #define DAY_3       3   /* Tuesday   */
  63. #define DAY_4       4   /* Wednesday */
  64. #define DAY_5       5   /* Thursday  */
  65. #define DAY_6       6   /* Friday    */
  66. #define DAY_7       7   /* Saturday  */
  67.  
  68. #define ABDAY_1 8   /* Sun */
  69. #define ABDAY_2 9   /* Mon */
  70. #define ABDAY_3 10  /* Tue */
  71. #define ABDAY_4 11  /* Wed */
  72. #define ABDAY_5 12  /* Thu */
  73. #define ABDAY_6 13  /* Fri */
  74. #define ABDAY_7 14  /* Sat */
  75.  
  76. #define MON_1       15  /* January   */
  77. #define MON_2       16  /* February  */
  78. #define MON_3       17  /* March     */
  79. #define MON_4       18  /* April     */
  80. #define MON_5       19  /* May       */
  81. #define MON_6       20  /* June      */
  82. #define MON_7       21  /* July      */
  83. #define MON_8       22  /* August    */
  84. #define MON_9       23  /* September */
  85. #define MON_10      24  /* October   */
  86. #define MON_11      25  /* November  */
  87. #define MON_12      26  /* December  */
  88.  
  89. #define ABMON_1 27  /* Jan */
  90. #define ABMON_2 28  /* Feb */
  91. #define ABMON_3 29  /* Mar */
  92. #define ABMON_4 30  /* Apr */
  93. #define ABMON_5 31  /* May */
  94. #define ABMON_6 32  /* Jun */
  95. #define ABMON_7 33  /* Jul */
  96. #define ABMON_8 34  /* Aug */
  97. #define ABMON_9 35  /* Sep */
  98. #define ABMON_10    36  /* Oct */
  99. #define ABMON_11    37  /* Nov */
  100. #define ABMON_12    38  /* Dec */
  101.  
  102. #define YESSTR      39  /* affirmative response for yes/no queries */
  103. #define NOSTR       40  /* negative response for yes/no queries    */
  104.  
  105. #define AM_STR      41  /* AM */
  106. #define PM_STR      42  /* PM */
  107.  
  108. #define SOFTHYPHEN  43  /* soft hyphenation */
  109. #define HARDHYPHEN  44  /* hard hyphenation */
  110.  
  111. #define OPENQUOTE   45  /* start of quoted block */
  112. #define CLOSEQUOTE  46  /* end of quoted block   */
  113.  
  114. #define YESTERDAYSTR    47  /* Yesterday */
  115. #define TODAYSTR    48  /* Today     */
  116. #define TOMORROWSTR 49  /* Tomorrow  */
  117. #define FUTURESTR   50  /* Future    */
  118.  
  119. #define MAXSTRMSG   51  /* current number of defined strings */
  120.  
  121.  
  122. /*****************************************************************************/
  123.  
  124.  
  125. /* OpenLibrary("locale.library", 0) returns a pointer to this structure */
  126. STRUCT LocaleBase
  127.  
  128.     _Library lb_LibNode 
  129.     SHORTINT       lb_SysPatches    /* TRUE if locale installed its patches */
  130. END STRUCT 
  131.  
  132.  
  133. /*****************************************************************************/
  134.  
  135.  
  136. /* This structure must only be allocated by locale.library and is READ-ONLY! */
  137. STRUCT Locale
  138.  
  139.     ADDRESS  loc_LocaleName        /* locale's name           */
  140.     ADDRESS  loc_LanguageName          /* language of this locale     */
  141.     STRING loc_PrefLanguages SIZE 40  /* 10*SIZEOF(ADDRESS) */    /* preferred languages         */
  142.     LONGINT   loc_Flags             /* always 0 for now        */
  143.  
  144.     LONGINT   loc_CodeSet           /* always 0 for now        */
  145.     LONGINT   loc_CountryCode           /* user's country code         */
  146.     LONGINT   loc_TelephoneCode         /* country's telephone code    */
  147.     LONGINT    loc_GMTOffset         /* minutes from GMT        */
  148.     BYTE    loc_MeasuringSystem       /* what measuring system?      */
  149.     BYTE    loc_CalendarType          /* what calendar type?         */
  150.     STRING loc_Reserved0 SIZE 2  
  151.  
  152.     ADDRESS  loc_DateTimeFormat        /* regular date & time format  */
  153.     ADDRESS  loc_DateFormat        /* date format by itself       */
  154.     ADDRESS  loc_TimeFormat        /* time format by itself       */
  155.  
  156.     ADDRESS  loc_ShortDateTimeFormat   /* SHORTINT date & time format    */
  157.     ADDRESS  loc_ShortDateFormat       /* SHORTINT date format by itself */
  158.     ADDRESS  loc_ShortTimeFormat       /* SHORTINT time format by itself */
  159.  
  160.     /* for numeric values */
  161.     ADDRESS  loc_DecimalPoint          /* character before the decimals */
  162.     ADDRESS  loc_GroupSeparator        /* separates groups of digits    */
  163.     ADDRESS  loc_FracGroupSeparator    /* separates groups of digits    */
  164.     ADDRESS   loc_Grouping          /* size of each group        */
  165.     ADDRESS   loc_FracGrouping          /* size of each group        */
  166.  
  167.     /* for monetary values */
  168.     ADDRESS  loc_MonDecimalPoint 
  169.     ADDRESS  loc_MonGroupSeparator 
  170.     ADDRESS  loc_MonFracGroupSeparator 
  171.     ADDRESS   loc_MonGrouping 
  172.     ADDRESS   loc_MonFracGrouping 
  173.     BYTE    loc_MonFracDigits         /* digits after the decimal point   */
  174.     BYTE    loc_MonIntFracDigits      /* for international representation */
  175.     STRING loc_Reserved1 SIZE 2  
  176.  
  177.     /* for currency symbols */
  178.     ADDRESS  loc_MonCS             /* currency symbol          */
  179.     ADDRESS  loc_MonSmallCS        /* symbol for small amounts     */
  180.     ADDRESS  loc_MonIntCS          /* internationl (ISO 4217) code */
  181.  
  182.     /* for positive monetary values */
  183.     ADDRESS  loc_MonPositiveSign       /* indicate positive money value   */
  184.     BYTE    loc_MonPositiveSpaceSep   /* determine if separated by space */
  185.     BYTE    loc_MonPositiveSignPos    /* position of positive sign   */
  186.     BYTE    loc_MonPositiveCSPos      /* position of currency symbol     */
  187.     BYTE    loc_Reserved2 
  188.  
  189.     /* for negative monetary values */
  190.     ADDRESS  loc_MonNegativeSign       /* indicate negative money value   */
  191.     BYTE    loc_MonNegativeSpaceSep   /* determine if separated by space */
  192.     BYTE    loc_MonNegativeSignPos    /* position of negative sign   */
  193.     BYTE    loc_MonNegativeCSPos      /* position of currency symbol     */
  194.     BYTE    loc_Reserved3 
  195. END STRUCT 
  196.  
  197. /* constants for Locale.loc_MeasuringSystem */
  198. #define MS_ISO      0   /* international metric system */
  199. #define MS_AMERICAN 1   /* american system         */
  200. #define MS_IMPERIAL 2   /* imperial system         */
  201. #define MS_BRITISH  3   /* british system          */
  202.  
  203. /* constants for Locale.loc_CalendarType */
  204. #define CT_7SUN 0   /* 7 days a week,  Sunday is the first day    */
  205. #define CT_7MON 1   /* 7 days a week,  Monday is the first day    */
  206. #define CT_7TUE 2   /* 7 days a week,  Tuesday is the first day   */
  207. #define CT_7WED 3   /* 7 days a week,  Wednesday is the first day */
  208. #define CT_7THU 4   /* 7 days a week,  Thursday is the first day  */
  209. #define CT_7FRI 5   /* 7 days a week,  Friday is the first day    */
  210. #define CT_7SAT 6   /* 7 days a week,  Saturday is the first day  */
  211.  
  212. /* constants for Locale.loc_MonPositiveSpaceSep and Locale.loc_MonNegativeSpaceSep */
  213. #define SS_NOSPACE 0  /* cur. symbol is NOT separated from value with a space */
  214. #define SS_SPACE   1  /* cur. symbol IS separated from value with a space     */
  215.  
  216. /* constants for Locale.loc_MonPositiveSignPos and Locale.loc_MonNegativeSignPos */
  217. #define SP_PARENS    0  /* () surround the quantity and currency_symbol   */
  218. #define SP_PREC_ALL  1  /* sign string comes before amount and symbol     */
  219. #define SP_SUCC_ALL  2  /* sign string comes after amount and symbol      */
  220. #define SP_PREC_CURR 3  /* sign string comes right before currency symbol */
  221. #define SP_SUCC_CURR 4  /* sign string comes right after currency symbol  */
  222.  
  223. /* constants for Locale.loc_MonPositiveCSPos and Locale.loc_MonNegativeCSPos */
  224. #define CSP_PRECEDES 0  /* currency symbol comes before value */
  225. #define CSP_SUCCEEDS 1  /* currency symbol comes after value  */
  226.  
  227. /* elements of the byte arrays pointed to by:
  228.  *   Locale.loc_Grouping
  229.  *   Locale.loc_FracGrouping
  230.  *   Locale.loc_MonGrouping
  231.  *   Locale.loc_MonFracGrouping
  232.  * are interpreted as follows:
  233.  *
  234.  *    255     indicates that no further grouping is to be performed
  235.  *    0       indicates that the previous element is to be repeatedly used
  236.  *        for the remainder of the digits
  237.  *    <other> the number of digits that comprises the current group
  238.  */
  239.  
  240.  
  241. /*****************************************************************************/
  242.  
  243.  
  244. /* Tags for OpenCatalog() */
  245. #define OC_TagBase     (TAG_USER + &H90000)
  246. #define OC_BuiltInLanguage OC_TagBase+1   /* language of built-in strings    */
  247. #define OC_BuiltInCodeSet  OC_TagBase+2   /* code set of built-in strings    */
  248. #define OC_Version     OC_TagBase+3   /* catalog version number required */
  249. #define OC_Language    OC_TagBase+4   /* preferred language of catalog   */
  250.  
  251.  
  252. /*****************************************************************************/
  253.  
  254.  
  255. /* Comparison types for StrnCmp() */
  256. #define SC_ASCII    0
  257. #define SC_COLLATE1 1
  258. #define SC_COLLATE2 2
  259.  
  260.  
  261. /*****************************************************************************/
  262.  
  263.  
  264. /* This structure must only be allocated by locale.library and is READ-ONLY! */
  265. STRUCT Catalog
  266.  
  267.     Node cat_Link    /* for internal linkage    */
  268.     SHORTINT   cat_Pad     /* to longword align       */
  269.     ADDRESS  cat_Language    /* language of the catalog */
  270.     LONGINT   cat_CodeSet     /* currently always 0      */
  271.     SHORTINT   cat_Version     /* version of the catalog  */
  272.     SHORTINT   cat_Revision    /* revision of the catalog */
  273. END STRUCT 
  274.  
  275.  
  276. /*****************************************************************************/
  277.  
  278.  
  279. #endif  /* LIBRARIES_LOCALE_H */
  280.